package com.pinapel.aixml.controller;

import javax.swing.tree.TreeModel;

import com.pinapel.aixml.models.Model;
import com.pinapel.aixml.ui.ArbolUI;

public class TreeController implements ITreeController {
	private IArbolesController mMainController;
	private ArbolUI mView;
	
	public TreeController(IArbolesController topController){
		mMainController=topController;
		
	}
	public IMainController getMainController() {
		
		return mMainController.getMainController();
	}

	
	public Model getModel() {
		
		return getMainController().getModel();
	}
	public void setView(ArbolUI view){
		mView = view;
		mView.setController(this);	
	}
	public void drawTree(TreeModel tree){
		mView.draw(tree);
	}
	

}
